module nyrsz(
input        day_add,
input        mon_add,
input        year_add,

output reg[7:0] day_out,
output reg[7:0] mon_out,
output reg[7:0] year_out
);


initial 
begin 
day_out='d0;
mon_out='d0;
year_out='d0;
end


//day
always@(posedge day_add)
begin
	  begin
		if(day_out=='d29)
		  begin
		   day_out=0;
		  end
		else
		  begin
		   day_out=day_out+1;
		  end
	  end	
	end
	
//mon
always@(posedge mon_add)
begin
	  begin
		if(mon_out=='d11)
		  begin
		   mon_out=0;
		  end
		else
		  begin
		   mon_out=mon_out+1;
		  end
	  end	
	end
	
//year
always@(posedge year_add)
begin
	  begin
		if(year_out=='d20)
		  begin
		   year_out=0;
		  end
		else
		  begin
		   year_out=year_out+1;
		  end
	  end	
	end
endmodule